package com.yztstudy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 轮播图的实体类
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "carousel")
public class Carousel implements Serializable {

    public static final Long serialVersionUID = 1L;

    // 成员变量

    @TableId(value = "carousel_id", type = IdType.AUTO)
    @JsonProperty("carouse_id")
    private Integer carouselId; // 轮播图主键

    @TableField(value = "img_path")
    private String imgPath; // 图片路径

    @TableField(value = "describes")
    private String describes; // 图片描述

    @TableField(value = "product_id")
    @JsonProperty("product_id")
    private Integer productId; // 产品主键

    @TableField(value = "priority")
    private Integer priority; // 优先级
}
